import java.io.*;

public class Test
{
	public static void main(String[] args)
	{
		// CONSOLE INPUT OUTPUT
		// See if an argument was passed from the command line
		if (args.length == 1)
			name = args[0];
		System.out.println("Hello, " + name + "!");
		
		// FILE INPUT OUTPUT
		// Character stream writing
		/*
		FileWriter writer = new FileWriter("c:\\myfile.txt");
		writer.write("Out to file.\n");
		writer.close();

		// Character stream reading
		FileReader reader = new FileReader("c:\\myfile.txt");
		BufferedReader br = new BufferedReader(reader);
		String line = br.readLine(); 
		while (line != null) {
		  System.out.println(line); 
		  line = br.readLine(); 
		} 
		reader.close();

		// Binary stream writing
		FileOutputStream out = new FileOutputStream("c:\\myfile.dat");
		out.write("Text data".getBytes());
		out.write(123);
		out.close();

		// Binary stream reading
		FileInputStream in = new FileInputStream("c:\\myfile.dat");
		byte buff[] = new byte[9];
		in.read(buff, 0, 9);   // Read first 9 bytes into buff
		String s = new String(buff);
		int num = in.read();   // Next is 123
		in.close();
		*/
	}
}
